package cn.com.jonpad.config.filter;

import org.springframework.web.filter.GenericFilterBean;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * @author Jon Chan
 * @date 2018/10/25 10:25
 */
public class BeforeLoginFilter extends GenericFilterBean {
	@Override
	public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
		System.out.println("This is a filter before UsernamePasswordAuthenticationFilter.");
		// 继续调用 Filter 链
		filterChain.doFilter(servletRequest, servletResponse);
	}
}
